        <?php
        if($pageURL!=$homepage){
        
        
            ?>
        <div class="breadcrumb sad_aaa">
            <div class="row breadcrumb_text">
            <?php
            if(!empty($_GET['product_id']))
                {
                    $get_pro        = mysql_query("SELECT cate.id as cate_id, pro.id, cate.parent_id as mcid, cate.category_name as pname, pro.product_name as proname FROM tblproduct AS pro
                    INNER JOIN tblproduct_in_category AS pcate ON pcate.product_id=pro.id
                    INNER JOIN tblcategory AS cate ON cate.id=pcate.category_id
                    WHERE pro.id='".$_GET['product_id']."'");
                    $pro_name       = mysql_fetch_assoc($get_pro);
                        // parent cate
                        $pid        = $pro_name['cate_id'];
                        $pname      = $pro_name['pname'];
                        $mcid       = $pro_name['mcid'];
                        $proname    = $pro_name['proname'];
                }
                    if(!empty($_GET['cat_p']))
                        {
                            $mcid = $_GET['cat_p'];
                        }    
                    if(!empty($_GET['cat_id']))
                        {
                            $mc_id        = $_GET['cat_id'];
                            $mcate       = mysql_query("SELECT category_name AS mcname FROM tblcategory WHERE id='".$mc_id."'");
                            $mcategory   = mysql_fetch_assoc($mcate);
                            $m_name       = $mcategory['mcname']; 
                        }
                    
                    // main cate
                    if(!empty($mcid))
                    {
                        $mcate      = mysql_query("SELECT category_name AS mcname FROM tblcategory WHERE id='".$mcid."'");
                        $mcategory  = mysql_fetch_assoc($mcate);
                            $mname  = $mcategory['mcname'];
                        
                        //for seller
                        $comIdseller = mysql_query("SELECT com.`shorturl`, com.`pharmacy_name` FROM tbluser
                                    INNER JOIN tblpharmacy AS com ON com.`user_id`=tbluser.`id`
                                     WHERE tbluser.`cat_id`='$mcid'");
                        $row_seller = mysql_fetch_array($comIdseller);                              
                        // end for seller
                    ?>
                    <i class="icon-home"></i><a href="<?php echo W_ROOT;?>">Home</a> / 
                    
                    <!-- if get company -->
                    <?php if(!empty($row_seller['shorturl']))
                    {
                        ?>
                        <a href="<?php echo W_ROOT;?>/<?php echo $row_seller['shorturl'];?>"> <?php echo $row_seller['pharmacy_name']; ?></a> /
                        <?php
                    }
                    ?>
                    <!-- end if get company -->
                    <a href="<?php echo W_ROOT;?>/product/?cat_p=<?php echo $mcid;?>"> <?php echo $mname; ?></a>
                    
                    <?php
                    if(!empty($_GET['cat_id']))
                    {?>
                        / <a href="<?php echo W_ROOT;?>/product/?cat_p=<?php echo $mcid;?>"> <?php echo $m_name; ?></a>
                    <?php
                    }
                    ?>
                    
                    
                    <?php
                    if(!empty($_GET['product_id']))
                    {?>
                     /
                    <a href="<?php echo W_ROOT;?>/product/?cat_p=<?php echo $pid;?>"> <?php echo $pname; ?></a>
                    / <?php echo $proname;
                    }
                } // end $mcid
                ?> 

        </div>
    </div>
        <?php
        }
            // END BREADCRUMB 
        ?>